package com.liyunc.demo.bundle.user.org.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.liyunc.demo.bundle.user.org.model.dto.input.PersonManagerRegisterRequestDto;
import com.liyunc.demo.bundle.user.org.model.dto.input.PersonRegisterRequestDto;
import com.liyunc.demo.bundle.user.org.model.dto.input.PersonResetPasswordRequestDto;
import com.liyunc.demo.bundle.user.org.model.dto.input.PersonUpdateRequestDto;
import com.liyunc.demo.bundle.user.org.model.dto.output.UserPersonalAccountDto;
import com.liyunc.demo.bundle.user.org.model.dto.output.PersonRegisterResponseDto;
import com.liyunc.demo.comp.common.rest.request.PageRequest;
import org.apache.commons.lang3.tuple.Pair;

import java.util.List;
import java.util.Optional;

/**
 * @author liyuncong
 * @version 1.0
 * @file UserPersonalAccountService.java
 * @brief UserPersonalAccountService
 * @details UserPersonalAccountService
 * @date 2022-04-01
 *
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                        NAME               DESCRIPTION
 * 2022-04-01                  liyuncong          Created
 */
public interface UserPersonalAccountService {

    Optional<PersonRegisterResponseDto> register(PersonRegisterRequestDto requestDto);

    Optional<PersonRegisterResponseDto> managerCreatePerson(PersonManagerRegisterRequestDto requestDto);

    Optional<UserPersonalAccountDto> authenticate(String loginUsername, String loginPassword);

    Optional<UserPersonalAccountDto> getCurrentLoginPersonInfo();

    Optional<UserPersonalAccountDto> updateAccountStatus(Long userPersonalAccountId, Integer status);

    Optional<UserPersonalAccountDto> resetPassword(PersonResetPasswordRequestDto requestDto);

    Optional<UserPersonalAccountDto> updatePersonInfo(PersonUpdateRequestDto requestDto);

    Optional<Pair<IPage<?>, List<UserPersonalAccountDto>>> searchUserPersonalAccounts(
        Long userPersonalAccountId, PageRequest pageRequest, String keyword);
}
